/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

function expanding(namakategori){
    var m = document.getElementsByName(namakategori).length;
    var i = 0;
    if (m > 0){
        if (document.getElementsByName(namakategori).item(0).style.display == "none"){
            while(i < m){
                document.getElementsByName(namakategori).item(i).style.display = "block";
                ++i;
            }
        } else {
            while(i < m){
                document.getElementsByName(namakategori).item(i).style.display = "none";
                ++i;
            }
        }
    } else {
        alert("Don't have any subcatagories");
    }
}

